//
//  XMGUserCell.m
//  01 baisi
//
//  Created by 檀志文 on 16/4/10.
//  Copyright © 2016年 ios檀志文. All rights reserved.
//

#import "XMGUserCell.h"
#import "XMGUser.h"
#import <UIImageView+WebCache.h>

@interface XMGUserCell()
@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
@property (weak, nonatomic) IBOutlet UILabel *screenNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *fansCountLabel;

@end

@implementation XMGUserCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setUsers:(XMGUser *)users{
    _users =users;
    
    self.screenNameLabel.text = users.screen_name;
    self.fansCountLabel.text = [NSString stringWithFormat:@"有%ld人关注",users.fans_count];
//    self.headImageView.image
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:users.header] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]];
    self.headImageView.layer.cornerRadius = 50;
    self.headImageView.layer.masksToBounds =YES;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
